package com.ssms.dao;

import com.ssms.commons.StuQueryParam;
import com.ssms.model.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    SysUser selectStuById(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser selectByCode(@Param("code") String code,@Param("clazzId") Integer clazzId);

    List<SysUser> selectAll(@Param("roleType") Integer roleType);

    List<SysUser> selectAllByClazzId(@Param("clazzId") Integer clazzId);

    SysUser selectInstructor(@Param("clazzId") Integer clazzId);

    List<SysUser> selectPage(@Param("start") int start, @Param("size") int size,
                             @Param("username") String username,
                             @Param("sex") String sex);

    int selectPageCount(@Param("username") String username,
                        @Param("sex") String sex);

    List<SysUser> selectStuPage(@Param("start") int start,  @Param("size") int size,@Param("queryParam") StuQueryParam queryParam);

    int selectStuPageCount(StuQueryParam queryParam);

    List<SysUser> selectGraduationPage(@Param("start") int start,  @Param("size") int size,@Param("grade") Integer grade);

    int selectGraduationPageCount(Integer grade);

    int checkPhone(SysUser record);

    int checkCode(SysUser record);

    SysUser selectByPhone(SysUser record);
}

